//
//  rzlistTableViewCell.m
//  hainingOASystem
//
//  Created by michael on 2017/12/2.
//  Copyright © 2017年 czd. All rights reserved.
//

#import "rzlistTableViewCell.h"

@implementation rzlistTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
self.bgView  = [[UIView alloc]init];
      _label1 = [[UILabel alloc]init];
      _label1.frame = CGRectZero;
      _label1.numberOfLines = 0;
       [_label1 setFont:[UIFont systemFontOfSize:13]];
       [self.bgView addSubview:_label1];
    
            _label11 = [[UILabel alloc]init];
      _label11.frame = CGRectZero;
      _label11.numberOfLines = 0;
       [_label11 setFont:[UIFont systemFontOfSize:13]];
       [self.bgView addSubview:_label11];
    
            _label2 = [[UILabel alloc]init];
      _label2.frame = CGRectZero;
      _label2.numberOfLines = 0;
       [_label2 setFont:[UIFont systemFontOfSize:13]];
       [self.bgView addSubview:_label2];
            _label22 = [[UILabel alloc]init];
      _label22.frame = CGRectZero;
      _label22.numberOfLines = 0;
       [_label22 setFont:[UIFont systemFontOfSize:13]];
       [self.bgView addSubview:_label22];
            _label3 = [[UILabel alloc]init];
      _label3.frame = CGRectZero;
      _label3.numberOfLines = 0;
       [_label3 setFont:[UIFont systemFontOfSize:13]];
       [self.bgView addSubview:_label3];
            _label33 = [[UILabel alloc]init];
      _label33.frame = CGRectZero;
      _label33.numberOfLines = 0;
       [_label33 setFont:[UIFont systemFontOfSize:13]];
       [self.bgView addSubview:_label33];
            _label4 = [[UILabel alloc]init];
      _label4.frame = CGRectZero;
      _label4.numberOfLines = 0;
       [_label4 setFont:[UIFont systemFontOfSize:13]];
       [self.bgView addSubview:_label4];
            _label44 = [[UILabel alloc]init];
      _label44.frame = CGRectZero;
      _label44.numberOfLines = 0;
       [_label44 setFont:[UIFont systemFontOfSize:13]];
       [self.bgView addSubview:_label44];
            _label5 = [[UILabel alloc]init];
      _label5.frame = CGRectZero;
      _label5.numberOfLines = 0;
       [_label5 setFont:[UIFont systemFontOfSize:13]];
       [self.bgView addSubview:_label5];
            _label55 = [[UILabel alloc]init];
      _label55.frame = CGRectZero;
      _label55.numberOfLines = 0;
       [_label55 setFont:[UIFont systemFontOfSize:13]];
       [self.bgView addSubview:_label55];
            _label6 = [[UILabel alloc]init];
      _label6.frame = CGRectZero;
      _label6.numberOfLines = 0;
       [_label6 setFont:[UIFont systemFontOfSize:13]];
       [self.bgView addSubview:_label6];
            _label66 = [[UILabel alloc]init];
      _label66.frame = CGRectZero;
      _label66.numberOfLines = 0;
       [_label66 setFont:[UIFont systemFontOfSize:13]];
       [self.bgView addSubview:_label66];
            _label7 = [[UILabel alloc]init];
      _label7.frame = CGRectZero;
      _label7.numberOfLines = 0;
       [_label7 setFont:[UIFont systemFontOfSize:13]];
       [self.bgView addSubview:_label7];
            _label77 = [[UILabel alloc]init];
      _label77.frame = CGRectZero;
      _label77.numberOfLines = 0;
       [_label77 setFont:[UIFont systemFontOfSize:13]];
       [self.bgView addSubview:_label77];
                _label8 = [[UILabel alloc]init];
      _label8.frame = CGRectZero;
      _label8.numberOfLines = 0;
       [_label8 setFont:[UIFont systemFontOfSize:13]];
       [self.bgView addSubview:_label8];
            _label88 = [[UILabel alloc]init];
      _label88.frame = CGRectZero;
      _label88.numberOfLines = 0;
       [_label88 setFont:[UIFont systemFontOfSize:13]];
       [self.bgView addSubview:_label88];
    


}

return self;

}
- (void)layoutSubviews{
[super layoutSubviews];
  self.bgView.frame =  CGRectMake(5, 5, KScreenWidth - 10, 220);
    self.bgView.backgroundColor = [UIColor whiteColor];
    //给bgView边框设置阴影
    self.bgView.layer.shadowOffset = CGSizeMake(1,1);
    self.bgView.layer.shadowOpacity = 0.3;
    self.bgView.layer.shadowColor = [UIColor blackColor].CGColor;
        self.bgView.layer.cornerRadius = 5;

    [self.contentView addSubview:self.bgView];
_label1.text = @"申请单号:";
_label11.text = _dic[@"f_num"];
_label2.text = @"申请时间:";
_label22.text = _dic[@"createTime"];
_label3.text = @"融资说明:";
_label33.text = _dic[@"b_description"];
_label4.text = @"融资金额:";
_label44.text = [NSString stringWithFormat:@"%@万元",_dic[@"amount"]];
_label5.text = @"融资年限:";
_label55.text = [NSString stringWithFormat:@"%@年",_dic[@"limit"]];
_label6.text = @"意向机构:";
_label66.text = _dic[@"institutionName"];
_label7.text = @"融资方式:";
_label77.text = _dic[@"way"];
_label8.text = @"回复状态:";
if([_dic[@"type"]isEqual:nil]){
_label88.text = @"未回复";
}else if([[NSString stringWithFormat:@"%@",_dic[@"type"]] isEqualToString:@"1"]){
_label88.text = @"已回复";

}else{
_label88.text = @"未回复";


}
      CGFloat width = KScreenWidth-20;

_label1.frame = CGRectMake(10, 0, 60, 30);
_label11.frame = CGRectMake(_label1.right, 0, width-60, 30);

_label2.frame = CGRectMake(10, _label1.bottom, 60, 30);
_label22.frame = CGRectMake(_label2.right, _label1.bottom, width-60, 30);

_label3.frame = CGRectMake(10, _label2.bottom, 60, 40);
_label33.frame = CGRectMake(_label3.right, _label2.bottom, width-60, 40);

_label4.frame = CGRectMake(10, _label3.bottom, 60, 30);
_label44.frame = CGRectMake(_label4.right, _label33.bottom, width/2-60, 30);

_label5.frame = CGRectMake(_label44.right, _label33.bottom, 60, 30);
_label55.frame = CGRectMake(_label5.right, _label33.bottom, width/2-60, 30);

_label6.frame = CGRectMake(10, _label4.bottom, 60, 30);
_label66.frame = CGRectMake(_label6.right, _label4.bottom, width-60, 30);

_label7.frame = CGRectMake(10, _label6.bottom, 60, 30);
_label77.frame = CGRectMake(_label7.right, _label6.bottom, width-60, 30);

_label8.frame = CGRectMake(10, _label7.bottom, 60, 30);
_label88.frame = CGRectMake(_label7.right, _label7.bottom, width-60, 30);
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
